<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       div {
           position: relative;
        width: 240px;
        height: 35px;
        border: 1px solid #000000;
       }
       /* 声明伪元素 */
       div::after {
           content: '';
           position: absolute;
           top: 10%;
           right: 15px;
           width: 10px;
           height: 10px;
           border-right:1px solid #000000;
           border-bottom:1px solid #000000;

           /* 旋转45度 */
           transform: rotate(45deg);
       }
       /* 鼠标经过div,里边的三角旋转 */
       div:hover::after {
           transform: rotate(225deg);
           transition: all .2s;
       }
    </style>
</head>
<body>
    <div></div>
</body>
</html>